package cn.xaut.查找表;

import static java.lang.Math.*;

public class test01 {

    public static void main(String[] args) {

        for (int i = 1; i < 11; i++) {

            int n = (int) pow(10, i);
            long sum = 0;

            long startTime = System.currentTimeMillis();
            
            for (int j = 0; j < n; j++) 
                sum += j;

            long endTime = System.currentTimeMillis();
            
            System.out.println("10^" + i + "的数据规模需要的时间：" + (endTime - startTime) + " ms\t\t\t\tsum = " + sum);
        }
    }
}
